package com.wn.icloud.provider.uac.remote.fallback;

import com.wn.icloud.common.authority.PermissionInfo;
import com.wn.icloud.common.msg.TableResultResponse;
import com.wn.icloud.common.util.user.JwtAuthenticationRequest;
import com.wn.icloud.common.vo.user.UserInfo;
import com.wn.icloud.provider.uac.remote.UserFeignApi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author leeyang
 * @create 2018/3/7.
 */
@Service
public class UserFeignApiFallback implements UserFeignApi {

    private Logger log = LoggerFactory.getLogger(UserFeignApiFallback.class);

    @Override
    public List<PermissionInfo> getPermissionByUsername(@PathVariable("username") String username) {
        log.error("调用{}异常{}", "getPermissionByUsername", username);
        return null;
    }

    @Override
    public List<PermissionInfo> getAllPermissionInfo() {
        log.error("调用{}异常", "getPermissionByUsername");
        return null;
    }

    @Override
    public UserInfo validate(JwtAuthenticationRequest authenticationRequest) {
        log.error("调用{}异常", "validate");
        return null;
    }

    @Override
    public TableResultResponse getUserlist(@RequestParam("page")  Integer page, @RequestParam("size")  Integer size) {
        log.error("调用{}异常", "validate");
        return null;
    }

    @Override
    public UserInfo getUserInfo(@RequestParam("userid") Integer userid) {
        log.error("调用{}异常", "validate");
        return null;
    }
}
